package cn.tt.tuantuanerp.tuantuanerp.product.webapi.config;

import com.aliyun.oss.OSSClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;

/**
 * 先是直接通过网址传文件地址,故该配置的文件暂不用
 * OSS配置类,封装oss信息并生成oSSClient对象用于向阿里云传递图片内容
 *
 *
 * @author gudiwen
 * @version 0.0.1
 */
/*@Configuration
@Data*/
public class OSSConfig {

    @Value("${aliyun.endpoint}")
        private String endpoint;
    @Value("${aliyun.accessKeyId}")
        private String accessKeyId;
    @Value("${aliyun.accessKeySecret}")
        private String accessKeySecret;
    @Value("${aliyun.bucketName}")
        private String bucketName;
    //自定义文件夹
        private String ossPath;

        @Bean
        public OSSClient oSSClient() {
            return new OSSClient(endpoint, accessKeyId, accessKeySecret);
        }

}
